feat(arch): Add appName property and expand Spring/testing wiring#10
Conversation
|
Warning Review limit reached
Next review available in: 18 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (41)
📝 WalkthroughWalkthroughThe archetype now requires ChangesArchetype generation
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant ArchetypeGenerator
participant GeneratedProject
participant IntegrationVerifier
User->>ArchetypeGenerator: provide appName and project options
ArchetypeGenerator->>GeneratedProject: generate modules, POMs, source trees, and resources
IntegrationVerifier->>GeneratedProject: inspect metadata, dependencies, and generated files
GeneratedProject-->>IntegrationVerifier: expose generated project contents
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 8
🧹 Nitpick comments (1)
src/main/resources/META-INF/archetype-post-generate.groovy (1)
962-1020: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueSQL logging and JPA properties are emitted unconditionally.
application.propertiesincludesspring.jpa.*,jdbc.datasource-proxy.enabled,decorator.datasource.*, andlogging.level.net.ttddyy.dsproxy.listener=TRACEeven when no database integration exists. These are harmless (ignored when the relevant auto-configurations are inactive) but could confuse users into thinking SQL logging is active. Consider gating these property blocks onhasDatabaseIntegration.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/main/resources/META-INF/archetype-post-generate.groovy` around lines 962 - 1020, Conditionally emit the JPA and SQL logging properties in the application.properties template based on hasDatabaseIntegration. Update the generation logic around the writeFile template so spring.jpa.*, jdbc.datasource-proxy.enabled, decorator.datasource.*, and logging.level.net.ttddyy.dsproxy.listener are included only when database integration is enabled, while preserving the common properties for all projects.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/main/resources/META-INF/archetype-post-generate.groovy`:
- Line 176: Guard the appName lookup in the archetype post-generation script
against a missing property before trimming it. Update the appName assignment to
use the same null-safe defaulting pattern as integrations, serviceAreas,
presentationTypes, and includeSpring, while preserving the existing trimmed
value behavior when present.
In `@src/site/asciidoc/building.adoc`:
- Line 47: Update the archetype-specific property documentation to account for
includeSpring from archetype-metadata.xml: either list all five properties,
including appName, integrations, serviceAreas, presentationTypes, and
includeSpring, or explicitly describe the existing four as commonly supplied and
mention includeSpring separately.
In `@src/site/asciidoc/requirements.adoc`:
- Around line 247-254: Update the acceptance-tests sentence in the package-info
guidance to describe the *AT classes under src/test/java as “real test content”
or “the actual acceptance-test classes,” while preserving the distinction that
their package-info Javadoc lives under src/main/java.
In `@src/site/asciidoc/usage.adoc`:
- Line 30: The usage documentation’s property list and prompt order are
inconsistent with the metadata and other interactive documentation. Update the
relevant section near “It then prompts…” to list all five archetype-specific
properties in the actual prompt order, including appName/integrations before
coordinates and includeSpring in its declared position, and document how users
can override includeSpring; keep usage.adoc, index.adoc, test-interactive.ps1,
and test-interactive.sh consistent.
In `@src/test/resources/projects/blank-service-areas/verify.groovy`:
- Around line 95-105: Update the package-info.java existence check list in the
test to include domain-service, using the generated path
domain-service/src/main/java/${p}/domain/service/package-info.java alongside the
other module entries.
In `@src/test/resources/projects/full/verify.groovy`:
- Around line 326-328: Update the module iteration in the
no-direct-Spring-dependency assertion to include both service-orders and
service-notifications, preserving the existing POM check and failure message for
each module.
In `@src/test/resources/projects/uppercase-types/verify.groovy`:
- Around line 99-111: Add the expected
`domain-service/src/main/java/${p}/domain/service/package-info.java` path to the
package-info existence list iterated by `check`, alongside the other generated
module paths, so the fallback single-service scenario is validated.
In `@test-interactive.ps1`:
- Around line 72-79: Update test-interactive.ps1 to preserve Unicode safely on
Windows PowerShell by saving it as UTF-8 with a BOM, or replace all non-ASCII
characters with ASCII equivalents; ensure the existing $answers test data
remains unchanged.
---
Nitpick comments:
In `@src/main/resources/META-INF/archetype-post-generate.groovy`:
- Around line 962-1020: Conditionally emit the JPA and SQL logging properties in
the application.properties template based on hasDatabaseIntegration. Update the
generation logic around the writeFile template so spring.jpa.*,
jdbc.datasource-proxy.enabled, decorator.datasource.*, and
logging.level.net.ttddyy.dsproxy.listener are included only when database
integration is enabled, while preserving the common properties for all projects.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 3e3f91c6-d4f3-443c-8203-91c2e7589946
📒 Files selected for processing (41)
src/main/resources/META-INF/archetype-post-generate.groovysrc/main/resources/META-INF/maven/archetype-metadata.xmlsrc/site/asciidoc/building.adocsrc/site/asciidoc/index.adocsrc/site/asciidoc/modules.adocsrc/site/asciidoc/requirements.adocsrc/site/asciidoc/usage.adocsrc/test/resources/projects/basic/archetype.propertiessrc/test/resources/projects/basic/verify.groovysrc/test/resources/projects/blank-presentation-types/archetype.propertiessrc/test/resources/projects/blank-presentation-types/verify.groovysrc/test/resources/projects/blank-service-areas/archetype.propertiessrc/test/resources/projects/blank-service-areas/verify.groovysrc/test/resources/projects/full/archetype.propertiessrc/test/resources/projects/full/verify.groovysrc/test/resources/projects/malformed-integrations/archetype.propertiessrc/test/resources/projects/malformed-integrations/verify.groovysrc/test/resources/projects/minimal/archetype.propertiessrc/test/resources/projects/minimal/verify.groovysrc/test/resources/projects/multi-integration/archetype.propertiessrc/test/resources/projects/multi-integration/verify.groovysrc/test/resources/projects/multi-service/archetype.propertiessrc/test/resources/projects/multi-service/verify.groovysrc/test/resources/projects/no-integrations/archetype.propertiessrc/test/resources/projects/no-integrations/verify.groovysrc/test/resources/projects/no-presentation/archetype.propertiessrc/test/resources/projects/no-presentation/verify.groovysrc/test/resources/projects/package-differs-from-groupid/archetype.propertiessrc/test/resources/projects/package-differs-from-groupid/verify.groovysrc/test/resources/projects/service-integration-match/archetype.propertiessrc/test/resources/projects/service-integration-match/verify.groovysrc/test/resources/projects/single-service-fallback/archetype.propertiessrc/test/resources/projects/single-service-fallback/verify.groovysrc/test/resources/projects/spring-off/archetype.propertiessrc/test/resources/projects/spring-off/verify.groovysrc/test/resources/projects/uppercase-types/archetype.propertiessrc/test/resources/projects/uppercase-types/verify.groovysrc/test/resources/projects/whitespace-tolerance/archetype.propertiessrc/test/resources/projects/whitespace-tolerance/verify.groovytest-interactive.ps1test-interactive.sh
|
/agentic_review |
Code Review by Qodo
1.
|
Implements the java-service-archetype Needed Changes spec: every generated
project now needs a human-readable name driving its class/property/prose
naming, richer SQL-logging and Spring Boot Admin observability, and shared
REST/GraphQL acceptance-test infrastructure, instead of hand-rolling these
per project after generation.
* Add required appName property (no default, prompted first) with class-name,
property-value, and prose transform rules
* Generate package-info.java only under src/main/java (Java rejects two files
compiled for the same package); acceptance-tests' lone one now describes the
functional tests themselves
* Add datasource-proxy-spring-boot-starter (SQL logging) to database integration
modules and acceptance-tests; add spring-boot-admin-starter-client and make
app's web/actuator stack unconditional regardless of presentationTypes
* Generate shared RestAcceptanceTestBase/GraphQlAcceptanceTestBase in
common-testing, and per-project AppRestAcceptanceTestBase/
AppGraphQlAcceptanceTestBase, {appName}AcceptanceTestConfiguration, and
logback-spring.xml in acceptance-tests
* Add appName-derived <name>/<description> and dependency-comment labels
(spring/this app/sql logging) across parent, app, service, domain-service,
domain-rest/graphql, presentation-graphql, and common-testing poms
* common-testing now depends on every domain module; no domain module depends
on common-testing, keeping the reactor acyclic
* Update all 16 archetype ITs, the interactive test scripts, and the site docs
(requirements/modules/usage/index/building.adoc) plus CLAUDE.md to match
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P76PdSVUG6SNJeXcGPrhyn
a2e112a to
b402311
Compare
Implements the java-service-archetype Needed Changes spec: every generated project now needs a human-readable name driving its class/property/prose naming, richer SQL-logging and Spring Boot Admin observability, and shared REST/GraphQL acceptance-test infrastructure, instead of hand-rolling these per project after generation.
Claude-Session: https://claude.ai/code/session_01P76PdSVUG6SNJeXcGPrhyn
Summary by CodeRabbit
New Features
Bug Fixes
package-info.javafiles in test sources and improved dependency wiring across generated modules.Documentation